<%@page import="edu.geo.dao.impl.GeometricDomainDao"%>
<%@page import="edu.geo.service.impl.GeometricDomainServiceFacade"%>
<%@page import="edu.geo.service.GeoinformaticsService"%>
<%@page import="edu.geo.db.conn.DBConnectionProvider"%>
<%@page import="edu.geo.db.conn.DBConnection"%>
<%@page import="edu.geo.containers.geomdomain.GeometricDomain"%>
<%@page import="edu.geo.geomdomain.GeometricDomainValidator"%>
<%@page import="edu.geo.containers.GeoJSonHandler"%>
<%
int id = Integer.parseInt(request.getParameter("domain"));
GeometricDomainServiceFacade geomDomainService = new GeometricDomainServiceFacade(new GeometricDomainDao(new DBConnection("geodb")));
GeometricDomain geomDomain = geomDomainService.retrieve(id);
String geoJson = GeoJSonHandler.asGeoJson(id, GeometricDomainValidator.validate(geomDomain));
out.println(geoJson);
%>